def on_drag(event):
    global dragged_card
    if dragged_card:
        delta_x = event.x - drag_data["x"]
        delta_y = event.y - drag_data["y"]
        x = dragged_card.winfo_x() + delta_x
        y = dragged_card.winfo_y() + delta_y
        dragged_card.place(x=x, y=y)